<!-- HTML header for doxygen 1.9.1-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.9.4" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>NumCpp: asarray.hpp Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
    <!-- ... other metadata & script includes ... -->
    <script type="text/javascript" src="../doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js"></script>
    <script type="text/javascript">
        DoxygenAwesomeDarkModeToggle.init()
    </script>
    <script type="text/javascript"
        src="../doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js"></script>
    <script type="text/javascript">
        DoxygenAwesomeFragmentCopyButton.init()
    </script>
    <script type="text/javascript" src="../doxygen-awesome-css/doxygen-awesome-paragraph-link.js"></script>
    <script type="text/javascript">
        DoxygenAwesomeParagraphLink.init()
    </script>
    <script type="text/javascript" src="../doxygen-awesome-css/doxygen-awesome-interactive-toc.js"></script>
    <script type="text/javascript">
        DoxygenAwesomeInteractiveToc.init()
    </script>
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr style="height: 56px;">
                        <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png" /></td>
                        <td id="projectalign" style="padding-left: 0.5em;">
                            <div id="projectname">NumCpp
                                &#160;<span id="projectnumber">2.12.1</span>
                            </div>
                            <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part --><!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('asarray_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">asarray.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="asarray_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#include &lt;forward_list&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#include &lt;initializer_list&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#include &lt;iterator&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#include &lt;list&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#include &quot;<a class="code" href="_enums_8hpp.html">NumCpp/Core/Enums.hpp</a>&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#include &quot;<a class="code" href="_type_traits_8hpp.html">NumCpp/Core/Internal/TypeTraits.hpp</a>&quot;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">#include &quot;<a class="code" href="_nd_array_8hpp.html">NumCpp/NdArray.hpp</a>&quot;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacenc.html">nc</a></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>{</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, std::enable_if_t&lt;is_val<span class="keywordtype">id</span>_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">   57</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::initializer_list&lt;dtype&gt; inList)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>    {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    }</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="namespacenc.html#a754234501d0d3064fb9c228344472744">   73</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::initializer_list&lt;std::initializer_list&lt;dtype&gt;&gt; inList)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    {</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> ArraySize, std::enable_if_t&lt;is_val<span class="keywordtype">id</span>_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="namespacenc.html#aa020d3cf1c181fdde3b754c613a4b51f">   90</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::array&lt;dtype, ArraySize&gt;&amp; inArray, <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a> pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>)</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inArray, pointerPolicy);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>    }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> Dim0Size, <span class="keywordtype">size_t</span> Dim1Size&gt;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="namespacenc.html#a7ccedc5e6302477ea2ed149545dd6b9f">  107</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::array&lt;std::array&lt;dtype, Dim1Size&gt;, Dim0Size&gt;&amp; inArray,</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>                           <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a>                                      pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>)</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    {</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inArray, pointerPolicy);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>    }</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, std::enable_if_t&lt;is_val<span class="keywordtype">id</span>_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="namespacenc.html#ad613b05df257f032fad0bd32ba590bb6">  125</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::vector&lt;dtype&gt;&amp; inVector, <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a> pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>)</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    {</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector, pointerPolicy);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    }</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="namespacenc.html#a9ac258c3742ac5e419d9208478d03bf5">  140</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> std::vector&lt;std::vector&lt;dtype&gt;&gt;&amp; inVector)</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    {</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    }</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> Dim1Size&gt;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="namespacenc.html#a291f07a0be7c044a96196fa615c9335c">  157</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(std::vector&lt;std::array&lt;dtype, Dim1Size&gt;&gt;&amp; inVector,</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>                           <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a>                             pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>)</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    {</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector, pointerPolicy);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>    }</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, std::enable_if_t&lt;is_val<span class="keywordtype">id</span>_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespacenc.html#abbd3cd34b7c321a564be240fa95056c4">  173</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> std::deque&lt;dtype&gt;&amp; inDeque)</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>    {</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inDeque);</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>    }</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span> </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="namespacenc.html#a44a7aeff1df6f06a12fafaefbc7c2be3">  188</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> std::deque&lt;std::deque&lt;dtype&gt;&gt;&amp; inDeque)</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>    {</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inDeque);</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    }</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keyword">typename</span> dtypeComp&gt;</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="namespacenc.html#a36b90aeaa12655a389b7a42c6e3e6276">  203</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> std::set&lt;dtype, dtypeComp&gt;&amp; inSet)</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>    {</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inSet);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>    }</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="namespacenc.html#a82f1ce3434632f3745a8e6f4fc0ab87d">  218</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> std::list&lt;dtype&gt;&amp; inList)</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    {</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>    }</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span> </div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Iterator&gt;</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"><a class="line" href="namespacenc.html#aa0127b6d17a87db3f9deed78e90f54bd">  234</a></span>    <span class="keyword">auto</span> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(Iterator iterBegin, Iterator iterEnd)</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span>    {</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;typename std::iterator_traits&lt;Iterator&gt;::value_type</a>&gt;(iterBegin, iterEnd);</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>    }</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> </div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"><a class="line" href="namespacenc.html#a221ecbc359cd7c5b2549cd322486e50a">  250</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> dtype* iterBegin, <span class="keyword">const</span> dtype* iterEnd)</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>    {</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(iterBegin, iterEnd);</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>    }</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="namespacenc.html#af6ce5f84e22d1fac95958f83394bbca6">  266</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> dtype* ptr, <a class="code hl_typedef" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> <a class="code hl_function" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>)</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>    {</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, <a class="code hl_function" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>);</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>    }</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="namespacenc.html#af4549b7faa13f0e2175b58d2eb9901fc">  283</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(<span class="keyword">const</span> dtype* ptr, <a class="code hl_typedef" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numRows, <a class="code hl_typedef" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numCols)</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span>    {</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, numRows, numCols);</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span>    }</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span> </div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype,</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span>             <span class="keyword">typename</span> UIntType,</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span>             std::enable_if_t&lt;std::is_integral_v&lt;UIntType&gt; &amp;&amp; !std::is_same_v&lt;UIntType, bool&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"><a class="line" href="namespacenc.html#a3baf1547b5fab8bcd2b16aecc4df4c0d">  303</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(dtype* ptr, UIntType <a class="code hl_function" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>, <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a> pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>) <span class="keyword">noexcept</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span>    {</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, <a class="code hl_function" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>, pointerPolicy);</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span>    }</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span>    <span class="comment">//============================================================================</span></div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span>    <span class="comment">// Method Description:</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype,</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span>             <span class="keyword">typename</span> UIntType1,</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span>             <span class="keyword">typename</span> UIntType2,</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span>             std::enable_if_t&lt;std::is_integral_v&lt;UIntType1&gt; &amp;&amp; !std::is_same_v&lt;UIntType1, bool&gt;, <span class="keywordtype">int</span>&gt; = 0,</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span>             std::enable_if_t&lt;std::is_integral_v&lt;UIntType2&gt; &amp;&amp; !std::is_same_v&lt;UIntType2, bool&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"><a class="line" href="namespacenc.html#a75bd0374330af97bb446ceb380a2acdd">  326</a></span>    <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code hl_function" href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">asarray</a>(dtype*        ptr,</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span>                           UIntType1     numRows,</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span>                           UIntType2     numCols,</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span>                           <a class="code hl_enumeration" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">PointerPolicy</a> pointerPolicy = <a class="code hl_enumvalue" href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">PointerPolicy::COPY</a>) <span class="keyword">noexcept</span></div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span>    {</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span>        <span class="keywordflow">return</span> <a class="code hl_class" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, numRows, numCols, pointerPolicy);</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span>    }</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno">  333</span>} <span class="comment">// namespace nc</span></div>
<div class="ttc" id="a_enums_8hpp_html"><div class="ttname"><a href="_enums_8hpp.html">Enums.hpp</a></div></div>
<div class="ttc" id="a_nd_array_8hpp_html"><div class="ttname"><a href="_nd_array_8hpp.html">NdArray.hpp</a></div></div>
<div class="ttc" id="a_type_traits_8hpp_html"><div class="ttname"><a href="_type_traits_8hpp.html">TypeTraits.hpp</a></div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html"><div class="ttname"><a href="classnc_1_1_nd_array.html">nc::NdArray</a></div><div class="ttdoc">Holds 1D and 2D arrays, the main work horse of the NumCpp library.</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:139</div></div>
<div class="ttc" id="anamespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Cartesian.hpp:40</div></div>
<div class="ttc" id="anamespacenc_html_a25f36ba02112a206936fae22b0724bb9"><div class="ttname"><a href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">nc::size</a></div><div class="ttdeci">uint32 size(const NdArray&lt; dtype &gt; &amp;inArray) noexcept</div><div class="ttdef"><b>Definition:</b> size.hpp:43</div></div>
<div class="ttc" id="anamespacenc_html_a64f1645ac47689306ff9f371926ebf37"><div class="ttname"><a href="namespacenc.html#a64f1645ac47689306ff9f371926ebf37">nc::asarray</a></div><div class="ttdeci">NdArray&lt; dtype &gt; asarray(std::initializer_list&lt; dtype &gt; inList)</div><div class="ttdef"><b>Definition:</b> asarray.hpp:57</div></div>
<div class="ttc" id="anamespacenc_html_ae31148c2c120e8ed49df98e7dcd960ec"><div class="ttname"><a href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ec">nc::PointerPolicy</a></div><div class="ttdeci">PointerPolicy</div><div class="ttdoc">Policy for NdArray constructor that takes in a pointer to data.</div><div class="ttdef"><b>Definition:</b> Enums.hpp:56</div></div>
<div class="ttc" id="anamespacenc_html_ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f"><div class="ttname"><a href="namespacenc.html#ae31148c2c120e8ed49df98e7dcd960ecae8606d021da140a92c7eba8d9b8af84f">nc::PointerPolicy::COPY</a></div><div class="ttdeci">@ COPY</div></div>
<div class="ttc" id="anamespacenc_html_af0f49663fb63332596e2e6327009d581"><div class="ttname"><a href="namespacenc.html#af0f49663fb63332596e2e6327009d581">nc::uint32</a></div><div class="ttdeci">std::uint32_t uint32</div><div class="ttdef"><b>Definition:</b> Types.hpp:40</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_9051d82ec7b39b1c992f5bf2868571ca.html">Functions</a></li><li class="navelem"><a class="el" href="asarray_8hpp.html">asarray.hpp</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
  </ul>
</div>
</body>
</html>
